﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Index : MonoBehaviour {

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    private static Index instance = null;
    public static Index GetInstance()
    { return instance; }
    private void Awake()
    {
        instance = this;
    }

    public static void Hide()
    {
        instance.gameObject.SetActive(false);
    }

    public void OnLogin()
	{
        /*		Loading.GetInstance ().StartLoading ();

                // data
                DataManager.Init ( ()=>{

                    lessonUI.GetInstance().ShowLessonList();
                    Loading.GetInstance ().EndLoading ();

                    gameObject.SetActive (false);
                } );*/

        User.GetInstance().ShowLogin();
    }

    public void OnRegister()
    {
        User.GetInstance().ShowReg();
    }


    public void OnTry()
    {
        lessonUI.GetInstance().ShowLessonList();
        gameObject.SetActive(false);
    }



}
